<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QxOrm: C:/Dvlp/_Perso/QxOrm/include/QxDao/QxDaoAsync.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo_qxorm.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">QxOrm
   &#160;<span id="projectnumber">1.4.3</span>
   </div>
   <div id="projectbrief">C++ Object Relational Mapping library</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_qx_dao_async_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">QxDaoAsync.h</div>  </div>
</div>
<div class="contents">
<a href="_qx_dao_async_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/****************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment">**</span>
<a name="l00003"></a>00003 <span class="comment">** http://www.qxorm.com/</span>
<a name="l00004"></a>00004 <span class="comment">** Copyright (C) 2013 Lionel Marty (contact@qxorm.com)</span>
<a name="l00005"></a>00005 <span class="comment">**</span>
<a name="l00006"></a>00006 <span class="comment">** This file is part of the QxOrm library</span>
<a name="l00007"></a>00007 <span class="comment">**</span>
<a name="l00008"></a>00008 <span class="comment">** This software is provided &#39;as-is&#39;, without any express or implied</span>
<a name="l00009"></a>00009 <span class="comment">** warranty. In no event will the authors be held liable for any</span>
<a name="l00010"></a>00010 <span class="comment">** damages arising from the use of this software</span>
<a name="l00011"></a>00011 <span class="comment">**</span>
<a name="l00012"></a>00012 <span class="comment">** Commercial Usage</span>
<a name="l00013"></a>00013 <span class="comment">** Licensees holding valid commercial QxOrm licenses may use this file in</span>
<a name="l00014"></a>00014 <span class="comment">** accordance with the commercial license agreement provided with the</span>
<a name="l00015"></a>00015 <span class="comment">** Software or, alternatively, in accordance with the terms contained in</span>
<a name="l00016"></a>00016 <span class="comment">** a written agreement between you and Lionel Marty</span>
<a name="l00017"></a>00017 <span class="comment">**</span>
<a name="l00018"></a>00018 <span class="comment">** GNU General Public License Usage</span>
<a name="l00019"></a>00019 <span class="comment">** Alternatively, this file may be used under the terms of the GNU</span>
<a name="l00020"></a>00020 <span class="comment">** General Public License version 3.0 as published by the Free Software</span>
<a name="l00021"></a>00021 <span class="comment">** Foundation and appearing in the file &#39;license.gpl3.txt&#39; included in the</span>
<a name="l00022"></a>00022 <span class="comment">** packaging of this file. Please review the following information to</span>
<a name="l00023"></a>00023 <span class="comment">** ensure the GNU General Public License version 3.0 requirements will be</span>
<a name="l00024"></a>00024 <span class="comment">** met : http://www.gnu.org/copyleft/gpl.html</span>
<a name="l00025"></a>00025 <span class="comment">**</span>
<a name="l00026"></a>00026 <span class="comment">** If you are unsure which license is appropriate for your use, or</span>
<a name="l00027"></a>00027 <span class="comment">** if you have questions regarding the use of this file, please contact :</span>
<a name="l00028"></a>00028 <span class="comment">** contact@qxorm.com</span>
<a name="l00029"></a>00029 <span class="comment">**</span>
<a name="l00030"></a>00030 <span class="comment">****************************************************************************/</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="preprocessor">#ifndef _QX_DAO_ASYNC_H_</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define _QX_DAO_ASYNC_H_</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#pragma once</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00046"></a>00046 <span class="preprocessor">#ifdef _QX_NO_PRECOMPILED_HEADER</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#ifndef Q_MOC_RUN</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="_qx_precompiled_8h.html">QxPrecompiled.h</a>&gt;</span> <span class="comment">// Need to include precompiled header for the generated moc file</span>
<a name="l00049"></a>00049 <span class="preprocessor">#endif // Q_MOC_RUN</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#endif // _QX_NO_PRECOMPILED_HEADER</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span>
<a name="l00052"></a>00052 <span class="preprocessor">#include &lt;QtCore/qqueue.h&gt;</span>
<a name="l00053"></a>00053 
<a name="l00054"></a>00054 <span class="preprocessor">#include &lt;QtSql/qsqlerror.h&gt;</span>
<a name="l00055"></a>00055 
<a name="l00056"></a>00056 <span class="preprocessor">#ifndef Q_MOC_RUN</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="_ix_persistable_8h.html" title="Common interface (abstract class) for persistents classes using QX_PERSISTABLE_HPP() and QX_PERSISTAB...">QxDao/IxPersistable.h</a>&gt;</span>
<a name="l00058"></a>00058 <span class="preprocessor">#include &lt;<a class="code" href="_qx_sql_query_8h.html" title="Define a user SQL query added to default SQL query builded by QxOrm library, and used by qx::dao::xxx...">QxDao/QxSqlQuery.h</a>&gt;</span>
<a name="l00059"></a>00059 <span class="preprocessor">#endif // Q_MOC_RUN</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span>
<a name="l00061"></a>00061 <span class="keyword">namespace </span>qx {
<a name="l00062"></a>00062 <span class="keyword">namespace </span>dao {
<a name="l00063"></a>00063 <span class="keyword">namespace </span>detail {
<a name="l00064"></a>00064 
<a name="l00069"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html">00069</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html" title="qx::dao::detail::QxDaoAsyncParams : all parameters for qx::QxDaoAsync class to execute queries...">QxDaoAsyncParams</a>
<a name="l00070"></a>00070 {
<a name="l00071"></a>00071 
<a name="l00072"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a2c0780e9c3454799d0b937ce96a07b7e">00072</a>    <span class="keyword">enum</span> <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851">dao_action</a> { <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a2c0780e9c3454799d0b937ce96a07b7e">dao_none</a>, <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a44cfc1821caa653c666e564925ee6c3f">dao_count</a>, <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a024470999bcc44edca4bd674c940e3b8">dao_fetch_by_id</a>, <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851ab571f5fdc2ead176daef166efba194a6">dao_fetch_all</a>, <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a75ecbe329618059c5aec142fc54f41d4">dao_fetch_by_query</a>, <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851aa758999fdcc3db0e18a1942dec937275">dao_insert</a>, 
<a name="l00073"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a29167a7a312b702cdb7c6d4943f87f46">00073</a>                      <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a29167a7a312b702cdb7c6d4943f87f46">dao_update</a>, <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a3bbd56e550a90f3c0ae890a5f2fe0e52">dao_save</a>, <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a92463585bd7fe8569f06db89fd49c8cf">dao_delete_by_id</a>, <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a3ed96b1726575b557a154c2ef3495aa7">dao_delete_all</a>, <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a8d924d801a47f69caf3c256dc230d1a2">dao_delete_by_query</a>, 
<a name="l00074"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a90959019344f121c388d1347cdebd8f4">00074</a>                      <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a7b4fbb9862eb94a3b50f54d26906c79a">dao_destroy_by_id</a>, <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a982c1009bd59a9d4125b688614701f43">dao_destroy_all</a>, <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a81e0adc491d79af49ecd72f6296e0e82">dao_destroy_by_query</a>, <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a90959019344f121c388d1347cdebd8f4">dao_execute_query</a>, <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a192009fa75638cbff1509194efc14b49">dao_call_query</a> };
<a name="l00075"></a>00075 
<a name="l00076"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#a5ef1abf9007d65c31f1fb7f26db6f356">00076</a>    <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851">dao_action</a>           <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#a5ef1abf9007d65c31f1fb7f26db6f356" title="Action to execute into the thread (asynchronous way)">daoAction</a>;           
<a name="l00077"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#ae79e16679fadb0aa33f88839c83f47e3">00077</a>    QString              <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#ae79e16679fadb0aa33f88839c83f47e3" title="Classname parameter to execute action (must implement qx::IxPersistable interface)">className</a>;           
<a name="l00078"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#a432951ad0b59acbf803f908253a6b0fd">00078</a>    <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a>       <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#a432951ad0b59acbf803f908253a6b0fd" title="Query parameter to execute action.">query</a>;               
<a name="l00079"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#ad867f88efb51382e62451478dff2d21d">00079</a>    QSqlDatabase *       <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#ad867f88efb51382e62451478dff2d21d" title="Database parameter to execute action.">pDatabase</a>;           
<a name="l00080"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#ade0773747f9388781173a3b853cae5a1">00080</a>    <a class="code" href="namespaceqx.html#ac6a83a2493567738599e729098d0e1d5">IxPersistable_ptr</a>    <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#ade0773747f9388781173a3b853cae5a1" title="Current instance parameter to execute action.">pInstance</a>;           
<a name="l00081"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#ac880db92daa0c58449938955b2396e63">00081</a>    <a class="code" href="namespaceqx.html#a8792a6513f37c4a4ba24a55dbabee03b">IxCollection_ptr</a>     <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#ac880db92daa0c58449938955b2396e63" title="List of instances fetched by query.">pListOfInstances</a>;    
<a name="l00082"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#aa5f9239edc2fe42fd8d77aaaf5ebaa16">00082</a>    QStringList          <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#aa5f9239edc2fe42fd8d77aaaf5ebaa16" title="List of columns parameter to execute action.">listColumns</a>;         
<a name="l00083"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#a9ea9e8124c5551f5b5c6a6be2fd3cfd1">00083</a>    QStringList          <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#a9ea9e8124c5551f5b5c6a6be2fd3cfd1" title="List of relationships parameter to execute action.">listRelations</a>;       
<a name="l00084"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#ad25afc44d9b32e280b6643d734339f4c">00084</a>    QVariant             <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#ad25afc44d9b32e280b6643d734339f4c" title="Current instance id parameter to execute action.">id</a>;                  
<a name="l00085"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#ae04a3f8348ed2443df4128c3553c8b1b">00085</a>    <span class="keywordtype">long</span>                 <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#ae04a3f8348ed2443df4128c3553c8b1b" title="Dao count value returned by qx::dao::count query.">daoCount</a>;            
<a name="l00086"></a>00086 
<a name="l00087"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#a3053e0bd42b95cf8acda833333bc99ca">00087</a>    <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#a3053e0bd42b95cf8acda833333bc99ca">QxDaoAsyncParams</a>() : <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#a5ef1abf9007d65c31f1fb7f26db6f356" title="Action to execute into the thread (asynchronous way)">daoAction</a>(<a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#acfd74f7ae1b14add1a8c2b0b84710851a2c0780e9c3454799d0b937ce96a07b7e">dao_none</a>), <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#ad867f88efb51382e62451478dff2d21d" title="Database parameter to execute action.">pDatabase</a>(NULL), <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#ae04a3f8348ed2443df4128c3553c8b1b" title="Dao count value returned by qx::dao::count query.">daoCount</a>(0) { ; }
<a name="l00088"></a><a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#a8fbe77754f878f36028773548a2f744e">00088</a>    <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao_async_params.html#a8fbe77754f878f36028773548a2f744e">~QxDaoAsyncParams</a>() { ; }
<a name="l00089"></a>00089 
<a name="l00090"></a>00090 };
<a name="l00091"></a>00091 
<a name="l00092"></a><a class="code" href="namespaceqx_1_1dao_1_1detail.html#aa44261fe54a4f61309768c6aa309072b">00092</a> <span class="keyword">typedef</span> qx_shared_ptr&lt;QxDaoAsyncParams&gt; <a class="code" href="namespaceqx_1_1dao_1_1detail.html#aa44261fe54a4f61309768c6aa309072b">QxDaoAsyncParams_ptr</a>;
<a name="l00093"></a>00093 
<a name="l00098"></a><a class="code" href="classqx_1_1dao_1_1detail_1_1_qx_dao_async_runner.html">00098</a> <span class="keyword">class </span><a class="code" href="_qx_macro_8h.html#aa569abe24f343fdc4ad5e12e156ba8a2">QX_DLL_EXPORT</a> <a class="code" href="classqx_1_1dao_1_1detail_1_1_qx_dao_async_runner.html" title="qx::dao::detail::QxDaoAsyncRunner : class with a slot to execute queries in another thread...">QxDaoAsyncRunner</a> : <span class="keyword">public</span> QObject
<a name="l00099"></a>00099 {
<a name="l00100"></a>00100 
<a name="l00101"></a>00101    Q_OBJECT
<a name="l00102"></a>00102 
<a name="l00103"></a>00103 <span class="keyword">public</span>:
<a name="l00104"></a>00104 
<a name="l00105"></a>00105    <a class="code" href="classqx_1_1dao_1_1detail_1_1_qx_dao_async_runner.html" title="qx::dao::detail::QxDaoAsyncRunner : class with a slot to execute queries in another thread...">QxDaoAsyncRunner</a>();
<a name="l00106"></a>00106    <span class="keyword">virtual</span> ~<a class="code" href="classqx_1_1dao_1_1detail_1_1_qx_dao_async_runner.html" title="qx::dao::detail::QxDaoAsyncRunner : class with a slot to execute queries in another thread...">QxDaoAsyncRunner</a>();
<a name="l00107"></a>00107 
<a name="l00108"></a>00108 <span class="keyword">protected</span>:
<a name="l00109"></a>00109 
<a name="l00110"></a>00110    QSqlError runQuery(<a class="code" href="namespaceqx_1_1dao_1_1detail.html#aa44261fe54a4f61309768c6aa309072b">qx::dao::detail::QxDaoAsyncParams_ptr</a> pDaoParams);
<a name="l00111"></a>00111 
<a name="l00112"></a>00112 Q_SIGNALS:
<a name="l00113"></a>00113 
<a name="l00114"></a>00114    <span class="keywordtype">void</span> queryFinished(<span class="keyword">const</span> QSqlError &amp; daoError, <a class="code" href="namespaceqx_1_1dao_1_1detail.html#aa44261fe54a4f61309768c6aa309072b">qx::dao::detail::QxDaoAsyncParams_ptr</a> pDaoParams);
<a name="l00115"></a>00115 
<a name="l00116"></a>00116 <span class="keyword">public</span> Q_SLOTS:
<a name="l00117"></a>00117 
<a name="l00118"></a>00118    <span class="keywordtype">void</span> onQueryStarted(<a class="code" href="namespaceqx_1_1dao_1_1detail.html#aa44261fe54a4f61309768c6aa309072b">qx::dao::detail::QxDaoAsyncParams_ptr</a> pDaoParams);
<a name="l00119"></a>00119 
<a name="l00120"></a>00120 };
<a name="l00121"></a>00121 
<a name="l00122"></a>00122 } <span class="comment">// namespace detail</span>
<a name="l00123"></a>00123 } <span class="comment">// namespace dao</span>
<a name="l00124"></a>00124 
<a name="l00169"></a><a class="code" href="classqx_1_1_qx_dao_async.html">00169</a> <span class="keyword">class </span><a class="code" href="_qx_macro_8h.html#aa569abe24f343fdc4ad5e12e156ba8a2">QX_DLL_EXPORT</a> <a class="code" href="classqx_1_1_qx_dao_async.html" title="qx::QxDaoAsync : helper class to execute SQL queries in another thread (asynchronous way) using qx::I...">QxDaoAsync</a> : <span class="keyword">public</span> QThread
<a name="l00170"></a>00170 {
<a name="l00171"></a>00171 
<a name="l00172"></a>00172    Q_OBJECT
<a name="l00173"></a>00173 
<a name="l00174"></a>00174 <span class="keyword">protected</span>:
<a name="l00175"></a>00175 
<a name="l00176"></a><a class="code" href="classqx_1_1_qx_dao_async.html#ac0919b907053a9284ab7d9ba8177c735">00176</a>    QMutex <a class="code" href="classqx_1_1_qx_dao_async.html#ac0919b907053a9284ab7d9ba8177c735" title="Mutex =&gt; qx::QxDaoAsync is thread-safe.">m_mutex</a>;                                       
<a name="l00177"></a><a class="code" href="classqx_1_1_qx_dao_async.html#ac1293e07eba741c2daf357e277f9c35b">00177</a>    <a class="code" href="namespaceqx_1_1dao_1_1detail.html#aa44261fe54a4f61309768c6aa309072b">qx::dao::detail::QxDaoAsyncParams_ptr</a> <a class="code" href="classqx_1_1_qx_dao_async.html#ac1293e07eba741c2daf357e277f9c35b" title="Parameters to execute query.">m_pDaoParams</a>;   
<a name="l00178"></a>00178 
<a name="l00179"></a>00179 <span class="keyword">public</span>:
<a name="l00180"></a>00180 
<a name="l00181"></a>00181    <a class="code" href="classqx_1_1_qx_dao_async.html" title="qx::QxDaoAsync : helper class to execute SQL queries in another thread (asynchronous way) using qx::I...">QxDaoAsync</a>();
<a name="l00182"></a>00182    <span class="keyword">virtual</span> ~<a class="code" href="classqx_1_1_qx_dao_async.html" title="qx::QxDaoAsync : helper class to execute SQL queries in another thread (asynchronous way) using qx::I...">QxDaoAsync</a>();
<a name="l00183"></a>00183 
<a name="l00184"></a>00184    <span class="keywordtype">bool</span> asyncCount(<span class="keyword">const</span> QString &amp; className, <span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query = <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a>(), QSqlDatabase * pDatabase = NULL);
<a name="l00185"></a>00185    <span class="keywordtype">bool</span> asyncFetchById(<a class="code" href="namespaceqx.html#ac6a83a2493567738599e729098d0e1d5">IxPersistable_ptr</a> pToFetch, <span class="keyword">const</span> QVariant &amp; <span class="keywordtype">id</span> = QVariant(), <span class="keyword">const</span> QStringList &amp; columns = QStringList(), <span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL);
<a name="l00186"></a>00186    <span class="keywordtype">bool</span> asyncFetchAll(<span class="keyword">const</span> QString &amp; className, <span class="keyword">const</span> QStringList &amp; columns = QStringList(), <span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL);
<a name="l00187"></a>00187    <span class="keywordtype">bool</span> asyncFetchByQuery(<span class="keyword">const</span> QString &amp; className, <span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, <span class="keyword">const</span> QStringList &amp; columns = QStringList(), <span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL);
<a name="l00188"></a>00188    <span class="keywordtype">bool</span> asyncInsert(<a class="code" href="namespaceqx.html#ac6a83a2493567738599e729098d0e1d5">IxPersistable_ptr</a> pToInsert, <span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL);
<a name="l00189"></a>00189    <span class="keywordtype">bool</span> asyncUpdate(<a class="code" href="namespaceqx.html#ac6a83a2493567738599e729098d0e1d5">IxPersistable_ptr</a> pToUpdate, <span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query = <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a>(), <span class="keyword">const</span> QStringList &amp; columns = QStringList(), <span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL);
<a name="l00190"></a>00190    <span class="keywordtype">bool</span> asyncSave(<a class="code" href="namespaceqx.html#ac6a83a2493567738599e729098d0e1d5">IxPersistable_ptr</a> pToSave, <span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL);
<a name="l00191"></a>00191    <span class="keywordtype">bool</span> asyncDeleteById(<a class="code" href="namespaceqx.html#ac6a83a2493567738599e729098d0e1d5">IxPersistable_ptr</a> pToDelete, <span class="keyword">const</span> QVariant &amp; <span class="keywordtype">id</span> = QVariant(), QSqlDatabase * pDatabase = NULL);
<a name="l00192"></a>00192    <span class="keywordtype">bool</span> asyncDeleteAll(<span class="keyword">const</span> QString &amp; className, QSqlDatabase * pDatabase = NULL);
<a name="l00193"></a>00193    <span class="keywordtype">bool</span> asyncDeleteByQuery(<span class="keyword">const</span> QString &amp; className, <span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, QSqlDatabase * pDatabase = NULL);
<a name="l00194"></a>00194    <span class="keywordtype">bool</span> asyncDestroyById(<a class="code" href="namespaceqx.html#ac6a83a2493567738599e729098d0e1d5">IxPersistable_ptr</a> pToDestroy, <span class="keyword">const</span> QVariant &amp; <span class="keywordtype">id</span> = QVariant(), QSqlDatabase * pDatabase = NULL);
<a name="l00195"></a>00195    <span class="keywordtype">bool</span> asyncDestroyAll(<span class="keyword">const</span> QString &amp; className, QSqlDatabase * pDatabase = NULL);
<a name="l00196"></a>00196    <span class="keywordtype">bool</span> asyncDestroyByQuery(<span class="keyword">const</span> QString &amp; className, <span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, QSqlDatabase * pDatabase = NULL);
<a name="l00197"></a>00197    <span class="keywordtype">bool</span> asyncExecuteQuery(<span class="keyword">const</span> QString &amp; className, <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, QSqlDatabase * pDatabase = NULL);
<a name="l00198"></a>00198    <span class="keywordtype">bool</span> asyncCallQuery(<a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, QSqlDatabase * pDatabase = NULL);
<a name="l00199"></a>00199 
<a name="l00200"></a><a class="code" href="classqx_1_1_qx_dao_async.html#a21fc93da3f0037c18ad62423f5d36c7e">00200</a>    <span class="keywordtype">bool</span> <a class="code" href="classqx_1_1_qx_dao_async.html#a21fc93da3f0037c18ad62423f5d36c7e">isQueryRunning</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (m_pDaoParams.get() != NULL); }
<a name="l00201"></a>00201 
<a name="l00202"></a>00202 <span class="keyword">protected</span>:
<a name="l00203"></a>00203 
<a name="l00204"></a>00204    <span class="keyword">virtual</span> <span class="keywordtype">void</span> run();
<a name="l00205"></a>00205 
<a name="l00206"></a>00206    <span class="keywordtype">void</span> startQuery();
<a name="l00207"></a>00207 
<a name="l00208"></a>00208 Q_SIGNALS:
<a name="l00209"></a>00209 
<a name="l00210"></a>00210    <span class="keywordtype">void</span> queryStarted(<a class="code" href="namespaceqx_1_1dao_1_1detail.html#aa44261fe54a4f61309768c6aa309072b">qx::dao::detail::QxDaoAsyncParams_ptr</a> pDaoParams);
<a name="l00211"></a>00211    <span class="keywordtype">void</span> queryFinished(<span class="keyword">const</span> QSqlError &amp; daoError, <a class="code" href="namespaceqx_1_1dao_1_1detail.html#aa44261fe54a4f61309768c6aa309072b">qx::dao::detail::QxDaoAsyncParams_ptr</a> pDaoParams);
<a name="l00212"></a>00212 
<a name="l00213"></a>00213 <span class="keyword">private</span> Q_SLOTS:
<a name="l00214"></a>00214 
<a name="l00215"></a>00215    <span class="keywordtype">void</span> onQueryFinished(<span class="keyword">const</span> QSqlError &amp; daoError, <a class="code" href="namespaceqx_1_1dao_1_1detail.html#aa44261fe54a4f61309768c6aa309072b">qx::dao::detail::QxDaoAsyncParams_ptr</a> pDaoParams);
<a name="l00216"></a>00216 
<a name="l00217"></a>00217 };
<a name="l00218"></a>00218 
<a name="l00219"></a><a class="code" href="namespaceqx.html#a8c7554382bc92422d29969fa640db4b7">00219</a> <span class="keyword">typedef</span> qx_shared_ptr&lt;QxDaoAsync&gt; <a class="code" href="namespaceqx.html#a8c7554382bc92422d29969fa640db4b7">QxDaoAsync_ptr</a>;
<a name="l00220"></a>00220 
<a name="l00221"></a>00221 } <span class="comment">// namespace qx</span>
<a name="l00222"></a>00222 
<a name="l00223"></a>00223 <span class="preprocessor">#endif // _QX_DAO_ASYNC_H_</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_qx_dao_async_8h.html">QxDaoAsync.h</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Sun Dec 11 2016 13:41:03 for QxOrm by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
